package PTA_05_24;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

class Student
{
    private String ID;
    private String name;
    private int score;

    public Student(String ID, String name, int score) {
        this.ID = ID;
        this.name = name;
        this.score = score;
    }

    public Student() {
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return ID + " " + name + " " + score;
    }
}

public class Main1 {
    public static void main(String[] args) {
        HashMap<String, Student> studentMap = new HashMap<>();
        Scanner scanner = new Scanner(System.in);
        //输入数据
        while (true) {
            String input = scanner.nextLine();
            if (input.equals("end"))
            {
                break;
            }

            String[] parts = input.split(" ");//根据数据regex将字符串分割到字符数组中
            String ID = parts[0];
            String name = parts[1];
            int score = Integer.valueOf(parts[2]);//返回保存指定的String类型的值的Integer对象

            Student student = new Student(ID, name, score);
            studentMap.put(ID, student);
        }

        //根据ID寻找学生
        String searchID = scanner.nextLine();
        Student searchedStudent = studentMap.get(searchID);
        if (searchedStudent != null) {
            System.out.println(searchedStudent);
        } else {
            System.out.println("The student " + searchID + " does not exist");
        }
    }
}
